<?php

namespace App\Http\Controllers;

use App\Models\Order;
use Illuminate\Http\Request;

class OrdersController extends Controller
{
    public function show(Order $order)
    {
        // 添加日志来调试数据
        \Log::info('订单数据:', ['order' => $order->toArray()]);
        
        // 确保数据不为空
        if (!$order) {
            abort(404, '订单不存在');
        }
        
        return view('orders.show', [
            'order' => $order
        ]);
    }
} 